<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例12</title>
    <style>
        .box{
            width: 200px;
            height: 200px;
            background-color: red;
            margin-top: 30px;
            position: absolute;
        }
    </style>
    <script src="jquery.js"></script>
    <script>
        function show(){
            $(".box").animate({
                right:"500px",
                top:"300px"
            },4000)
        }
    </script>
</head>
<body>
    <button onclick="show()">开始</button>
    <div class="box"></div>
</body>
</html>